#### note: this is also in the "labeled_tweets" code
if (!glove_embeddings) {

pdf("figs/Figure3_A18_labeled_tweets_over_time_si_suppression_replicate_psrm.pdf", width=13, height=12)

par(mfrow=c(2, 2), mar=c(4.5, 5, 5, 4))

with(
    aggregated_tweets_right,
    plot(
        tweet_date, n_vote / n_tweets,
        type="l", col="black", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction of Tweets",
        main="Voting Tweets - contain any of:\n\"vote\", \"voting\", \"election\", \"support\"",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")),
        cex.lab=2.25, cex.axis=2.25, cex.main=1.8,
        ylim=c(0, 1)
    )
)
with(
    aggregated_tweets_left,
    lines(
        tweet_date, n_vote / n_tweets,
        type="l", col="gray", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction of Tweets", main="",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")),
        cex.lab=1.5, cex.axis=1.5)
)
legend(
    "topleft",
    legend=c("Left trolls", "Right trolls"), lty=1, col=c("gray", "black"),
    bty="n",
    cex=2.25,
    lwd=6
)

####  ####  ####
####  ####  ####
## SUPPRESS

with(
    aggregated_tweets_right,
    plot(
        tweet_date, n_no_vote / n_tweets,
        type="l", col="black", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction of Tweets",
        main="Negated Voting Tweets - contain any of:\n\"vote\", \"voting\", \"election\", \"support\" AND negation",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")),
        cex.lab=2.25, cex.axis=2.25, cex.main=1.8,
        ylim=c(0, 1))
)
with(
    aggregated_tweets_left,
    lines(
        tweet_date, n_no_vote / n_tweets,
        type="l", col="gray", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction of Tweets", main="",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")),
        cex.lab=1.5, cex.axis=1.5
    )
)
legend(
    "topleft",
    legend=c("Left trolls", "Right trolls"),
    lty=1, col=c("gray", "black"), bty="n", cex=2.25, lwd=6
)



with(
    aggregated_tweets_left,
    plot(
        tweet_date, n_no_vote / n_vote,
        type="l", col="gray", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction Negated",
        main="Negated: Fraction of Voting Tweets",
        ## main="\"vote\", \"voting\", \"election\", \"support\" + \nnegation",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")),
        cex.lab=2.25, cex.axis=2.25, cex.main=1.8,
        ylim=c(0, 1))
)
with(
    aggregated_tweets_right,
    lines(
        tweet_date, n_no_vote / n_vote,
        type="l", col="black", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction Negated", main="",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")), cex.lab=1.5, cex.axis=1.5)
)
legend(
    "topleft",
    legend=c("Left trolls", "Right trolls"),
    lty=1, col=c("gray", "black"), bty="n",
    cex=2.25,
    lwd=6
)


with(
    aggregated_tweets_left,
    plot(
        tweet_date, n_vote_neg_sent / n_vote_any_sent,
        type="l", col="gray", bty="n", lwd=6,
        xlab="Date (weekly)", ylab="Fraction Negative Sentiment",
        main="Negative Sentiment: Fraction of Voting Tweets",
        xlim=c(as.Date("2015-01-01"), as.Date("2016-11-08")),
        cex.lab=2.25, cex.axis=2.25, cex.main=1.8,
        ylim=c(0, 1))
)
with(
    aggregated_tweets_right,
    lines(
        tweet_date, n_vote_neg_sent / n_vote_any_sent,
        col="black", lwd=6
    )
)
legend(
    "topleft",
    legend=c("Left trolls", "Right trolls"),
    lty=1, col=c("gray", "black"), bty="n",
    cex=2.25,
    lwd=6
)

dev.off()

}


